<template>
  <div class="species-library">
    <h1>物种库</h1>
    <div class="library-cards">
      <div class="library-card" @click="goToPlantLibrary">
        <div class="card-icon">
          <i class="el-icon-s-goods"></i>
        </div>
        <h3>植物库</h3>
        <p>查看和管理植物物种信息</p>
      </div>
      <div class="library-card" @click="goToAnimalLibrary">
        <div class="card-icon">
          <i class="el-icon-s-custom"></i>
        </div>
        <h3>动物库</h3>
        <p>查看和管理动物物种信息</p>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "SpeciesLibrary",
  data() {
    return {};
  },
  created() {},
  mounted() {},
  methods: {
    goToPlantLibrary() {
      this.$router.push("/species-library/plant-library");
    },
    goToAnimalLibrary() {
      this.$router.push("/species-library/animal-library");
    },
  },
};
</script>

<style scoped>
.species-library {
  padding: 40px;
  text-align: center;
  min-height: calc(100vh - 84px);
  background-color: #f5f7fa;
}

.species-library h1 {
  color: #303133;
  margin-bottom: 40px;
  font-size: 32px;
}

.library-cards {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.library-card {
  background: white;
  border-radius: 12px;
  padding: 40px;
  width: 280px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.library-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.card-icon {
  font-size: 48px;
  color: #409eff;
  margin-bottom: 20px;
}

.library-card h3 {
  color: #303133;
  font-size: 24px;
  margin-bottom: 12px;
}

.library-card p {
  color: #606266;
  font-size: 14px;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .species-library {
    padding: 20px;
  }

  .library-cards {
    flex-direction: column;
    align-items: center;
  }

  .library-card {
    width: 100%;
    max-width: 320px;
  }
}
</style>
